<?php
class Form_AdminLogon extends Zend_Form{
	public $formDecorators = array(array('FormElements'), array('Form'));
    public $elementDecorators = array(
    									array('ViewHelper'), 
    									array('Label'), 
    									array('Errors'),
    									array("HtmlTag",array("tag"=>"div","class"=>"row"))
    								);
    public $buttonDecorators = array(
										array('ViewHelper'),
										
									);
	public function init(){
		$this->setDecorators($this->formDecorators);
		$this->setOptions(array("id"=>"frmAdminLogon"));
		
		
		//tạo element input type=text name=username size=20
		$txtUsername = $this->createElement("text", "username",array("size"=>"20"))
							->setRequired(true)
							->setLabel("Tên sử dụng:")
							->setDecorators($this->elementDecorators);
		//tạo element input type=password name=password size = 20
		$txtPassword = $this->createElement("password", "password",array("size"=>"20")) 
							->setRequired(true)
							->setLabel("Mật khẩu:")
							->setDecorators($this->elementDecorators);
		//tạo element input type=button name=btnLogon
		$btnLogon = $this->createElement("submit", "btnSubmit",array("label"=>"Đăng nhập"))
						 
						
						 ->setDecorators($this->buttonDecorators);
		
		//add elements
		$this->addElement($txtUsername)->addElement($txtPassword)->addElement($btnLogon);
						 
	}
}